//--------------------------------------------------------------------------------
// This file is a portion of the D2D1Renderer.  It is distributed
// under the MIT License, available in the root of this distribution and 
// at the following URL:
//
// http://www.opensource.org/licenses/mit-license.php
//
// Copyright (c) Mirco Timmermann
//
//--------------------------------------------------------------------------------
#pragma once

#include "DisplayObject.h"

//TODO:

namespace D2 {

class Text : public DisplayObject {
public:
	/*
	* The horizontal text alignment.
	*/
	enum TextAlign {
		LEFT,
		CENTER,
		RIGHT
	};

	/*
	* The vertical text alignment.
	*/
	enum TextBaseline {
		TOP,
		MIDDLE,
		BOTTOM
	};

public:
	Text();
	Text(int x, int y);
	Text(int x, int y, int width, int height);
	virtual ~Text(void);

	virtual bool Draw(Direct2DContext* ctx, D2D1::Matrix3x2F* mtx = 0);

private:
	std::string _text;
	std::string _font;
	float _maxWidth;
	float _textHeight;
	//std::string _color;
	float _r;
	float _g;
	float _b;

public:
	void SetText(std::string text);
	std::string GetText();

};

}